package com.zd.service.impl;

import com.zd.mapper.MajorMapper;
import com.zd.model.Major;
import com.zd.service.IMajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Service
public class MajorServiceImpl implements IMajorService {

    @Autowired
    private MajorMapper majorMapper;

    public List<Major> selectMajorInfo() {
        return majorMapper.selectMajorInfo();
    }

    @Override
    public List<Major> selectMajor(@RequestParam Map<String, Object> majorMap) {
        return majorMapper.selectMajor(majorMap);
    }

    public Major selectByPrimaryKey(int id) {
        return majorMapper.selectByPrimaryKey(new Long (id));
    }
}
